Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    list: [{
      pagePath: "pages/index/index",
      iconPath: "/static/icon/home.png",
      selectedIconPath: "/static/icon/home.png",
      text: "首页",
	  min: false,
	  id: 'home'
    }, {
      pagePath: "pages/index/history",
      iconPath: "/static/icon/add.png",
      selectedIconPath: "/static/icon/add.png",
      text: "添加就诊人",
	  min: true,
	  id: 'add'
    }, {
      pagePath: "pages/index/history",
      iconPath: "/static/icon/my.png",
      selectedIconPath: "/static/icon/my.png",
      text: "我的",
	  min: false,
	  id: 'my'
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      this.setData({
        selected: data.index
      })
    }
  }
})